/**
 * 
 */
package com.mycompany.client.pages;

import com.mycompany.client.CoralPage;
import com.mycompany.client.widgets.layout.CoralBasicVLayout;
import com.smartgwt.client.types.Overflow;
import com.smartgwt.client.widgets.Canvas;
import com.smartgwt.client.widgets.grid.ListGrid;
import com.smartgwt.client.widgets.grid.ListGridField;

/**
 * @author coral.ma
 *
 */
public class ManageSalesActivityPage extends CoralPage {
	
	public static String ID = "ManageSalesActivityPage";
	private String NAME = "Manage Sales Activity";
	private String DESCRIPTION = "Manage Sales Activity";
	
	public static CoralPage create() {
		ManageSalesActivityPage activityPage = new ManageSalesActivityPage();
		return activityPage;
	}
	
	public Canvas getViewPage() {
		CoralBasicVLayout layout = new CoralBasicVLayout(ID);

		final ListGrid countryGrid = new ListGrid();  
        countryGrid.setWidth100();  
        countryGrid.setHeight(1);  
        countryGrid.setTop(50);  
        countryGrid.setShowAllRecords(true);  
        countryGrid.setBodyOverflow(Overflow.VISIBLE);  
        countryGrid.setOverflow(Overflow.VISIBLE);  
        countryGrid.setLeaveScrollbarGap(false);  
  
        ListGridField activityCategoryField = new ListGridField("activityCategory", i18n.activityCategory(), 100);
        ListGridField agentCodeField = new ListGridField("agentCode", i18n.agentCode(), 100);
        ListGridField statusField = new ListGridField("status", i18n.status(), 100);
        ListGridField customerCodeField = new ListGridField("customerCode", i18n.customerCode(), 100);
        ListGridField customerNameField = new ListGridField("customerName", i18n.customerName(), 100);
        ListGridField planndDateField = new ListGridField("planndDate", i18n.planndDate(), 100);
        ListGridField actualDateField = new ListGridField("actualDate", i18n.actualDate(), 100);
        
        countryGrid.setFields(activityCategoryField, agentCodeField, statusField, customerCodeField, customerNameField, planndDateField, actualDateField);
        layout.addMember(countryGrid);
		return layout;
	}
	
	public String getPageDescription() {
		return DESCRIPTION;
	}

	public String getPageName() {
		return NAME;
	}
	
	public String getIcon() {
		return null;
	}
}
